package cn.bugstack.domain.strategy.service.rule.chain;

/**
 * @Title: AbstractLogicChain
 * @Author 程志琨
 * @Package cn.bugstack.domain.strategy.service.rule.chain
 * @Date 2025/3/1 23:33
 * @description: 抽象责任链类 封装 责任链接口
 */
public abstract class AbstractLogicChain implements ILogicChain {

    private ILogicChain next;

    @Override
    public ILogicChain appendNext(ILogicChain next) {
        this.next = next;
        return next;
    }

    @Override
    public ILogicChain next() {
        return next;
    }

    /**
     * 让每个子类去构建对应的名字，不再需要枚举主动写入
     * @return 规则类型
     */
    protected abstract String ruleModel();


}
